package com.bogewang.ch7_7;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.awt.*;

@SpringBootApplication
@Controller
public class Ch77Application {

	public static void main(String[] args) {
		SpringApplication.run(Ch77Application.class, args);
	}

	@RequestMapping(value="/search", produces = {MediaType.APPLICATION_JSON_VALUE})
    public Person search(String personName, String age) throws Exception{
	    // modify by wangbo1522@szlongtu.com 2017/8/22 9:40
	    return new Person(personName, 32, "hefei");
    }
}
